import factory.AbstractFactory;
import factory.CreatFactory;
import life.interfaces.Life;
import work.interfaces.Work;

/**
 * @author ItJianGe
 * @data 2024/7/18 17:52
 */
public class Main {
    public static void main(String[] args) {
        AbstractFactory lifeFactory = CreatFactory.getFactory("life");
        Life axinlife = lifeFactory.getLife("axinlife");
        Life abolife = lifeFactory.getLife("abolife");

        axinlife.eat();
        abolife.eat();


        AbstractFactory workFactory = CreatFactory.getFactory("work");
        Work axinWork = workFactory.getWork("axinwork");
        Work aboWork = workFactory.getWork("abowork");

        axinWork.job();
        aboWork.job();
    }
}